package com.model.pool;

import com.model.ClassInfo;
import com.model.structure.ConstantPool;
import com.util.Analysis;
import lombok.Data;

/**
 * @author 基础常量处理
 */
@Data
public class BaseConstantDecorate{

    /**
     * 类型
     */
    private String constantPoolInfoType;
    /**
     * tag
     */
    private int tag;
    /**
     * tag长度
     */
    private int len=1;


    /**
     * 解析
     * @param info
     */
     public void invoke(ClassInfo info,Analysis analysis) {
        ConstantPool pool = new ConstantPool();
        tag = analysis.util.sixteenToTenInt(analysis.readValue(pool.getLen()));
        setTag(tag);
        new ConstantUtfInfo().invoke(info,analysis,tag);
    }
}
